<link rel="import" href="../../bower_components/polymer/polymer-element.html">

<dom-module id="custom-event">
  <template>
    <style>
       :host {
        display: block;
      }

    </style>
    <div>
      <button on-click="fireCustomEvent">点我</button>
    </div>
  </template>

  <script>
    /**
     * @CustomEvent
     * @polymer
     */
    class CustomEventDemo extends Polymer.Element {
      static get is() {
        return 'custom-event';
      }
      fireCustomEvent(){
          let event = new CustomEvent("my-event",{detail:{param:111}});
          this.dispatchEvent(event);
      }
    }
    window.customElements.define(CustomEventDemo.is, CustomEventDemo);

  </script>
</dom-module>
